package com.cqhfan.pojo.content.vo;

import com.cqhfan.core.constans.DateConstants;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author 眭传洪
 * @create 2025-08-14 0:01
 */
@Data
public class CommentVO {

    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    // 父评论id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long parentId;

    // 评论内容
    private String content;

    // 发布者id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long publishUserId;

    // 发布者用户名
    private String publishUserNickName;

    // 发布者头像
    private String publishUserAvatar;

    // 回复者用户id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long replyUserId;

    // 回复者用户名
    private String replyUserNickName;

    // 回复者头像
    private String replyUserAvatar;

    // 底下的评论数
    private Integer commentQuantity;

    // 点赞数
    private Integer likesQuantity;

    // 是否点赞
    private Boolean ifLiked;

    // 发布时间
    @JsonFormat(pattern = DateConstants.DATE_TIME_FORMAT)
    private LocalDateTime publishTime;

}
